#!/bin/sh
# install zsh
yum install -y epel-release yum-utils
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum clean all && sudo yum makecache fast
yum update -y
yum remove vim-* -y
wget -P /etc/yum.repos.d/  https://copr.fedorainfracloud.org/coprs/lbiaggi/vim80-ligatures/repo/epel-7/lbiaggi-vim80-ligatures-epel-7.repo
yum  install vim-enhanced sudo -y
yum install -y  zsh git python-pip 
yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
chsh -s /bin/zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
/bin/cp -f ./.zshrc ~/.zshrc

yum install -y gcc-c++ make openresty
yum install -y nodejs
yum install -y yarn
npm -g install instant-markdown-d jshint
pip install isort jedi yapf flake8 virtualenvwrapper autopep8
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
/bin/cp -f ./.vimrc ~/.vimrc

# add nginx site
/bin/cp -f ./nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
mkdir -p /usr/local/openresty/nginx/conf/sites
/bin/cp -f ./g.sectrain.cn.conf /usr/local/openresty/nginx/conf/sites/